cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
set(ROS_BUILD_TYPE Release)

rosbuild_init()

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

link_directories(/usr/lib)

rosbuild_genmsg()

rosbuild_add_executable(FakeMotors src/FakeMotors.cpp)
rosbuild_add_executable(FakeMotorsTest src/FakeMotorsTest.cpp)

rosbuild_add_executable(CameraNode src/CameraNode.cpp)
target_link_libraries(CameraNode v4l2)
rosbuild_add_executable(CameraNodeTest src/CameraNodeTest.cpp)

rosbuild_add_executable(serializerNode src/serializerNode.cpp)

rosbuild_add_executable(imuNodeTest src/imuNodeTest.cpp)
rosbuild_add_executable(imuNode src/imuNode.cpp)
target_link_libraries(imuNode phidget21)

rosbuild_add_executable(adcNode src/adc.cpp)
target_link_libraries(adcNode RBIO)
rosbuild_add_executable(adcNodeTester src/adc_tester.cpp)
